using System;
using FluentNHibernate.Mapping;
using Caramel.Entities;

namespace Caramel.FluentNHibernate.Mapping
{
	public abstract class ImmutableEntityMap<T> : ClassMap<T> where T : IImmutableEntity<Guid?>
	{
		protected ImmutableEntityMap()
		{
			this.Id(e => e.ID).
				GeneratedBy.
				GuidComb();

			this.MapImmutable();
		}
	}
}
